import { Authority,getBolb } from '../request'
const { post, get } = Authority

// 评价列表
export const queryList = params => get('/form/content/v1/queryList',{ params })
// 批量导入检查井
export const importManholeData = (url,params) => post('/pipe/manhole-cover/v1/import/'+url, params)

// 批量导入分段
export const importWaterInfoData = (url,params) => post('/pipe/water-pipe/v1/import/'+url, params)
// 基础单元新增
export const baseUnitAdd = data => post('/pipe/base-unit/v1/add', data)
// 基础单元更新
export const baseUnitUpdate = data => post('/pipe/base-unit/v1/update', data)
// 基础单元下拉选择
export const baseUnitSelectList = params => get('/pipe/base-unit/v1/querySelectList', { params })
// 配置版本列表
export const baseUnitQueryList =params => get('/pipe/base-unit/v1/queryList',{ params })

//公共部分
// 管线新增
export const pipeInfoAdd = data => post('/pipe/pipe-info/v1/add', data)
// 管线列表
export const pipeInfoQueryList =params => get('/pipe/pipe-info/v1/queryList',{ params })
// 管线更新
export const  pipeInfoUpdate = data => post('/pipe/pipe-info/v1/update', data)

//管线删除
export const pipeInfoDelete = params => post('/pipe/pipe-info/v1/delete', params)
//管线饼图数据
export const pipeChartCount =params => get('/statistics/pipe/v1/pipeChartCount',{ params })
//不同部分
// 给排水管线分段新增新增
export const waterInfoAdd = data => post('/pipe/water-pipe/v1/add', data)
// 给排水管线分段新增列表
export const waterInfoQueryList =params => get('/pipe/water-pipe/v1/queryList',{ params })
// 给排水管线分段新增更新
export const  waterInfoUpdate = data => post('/pipe/water-pipe/v1/update', data)
//分段排序
export const  waterInfoUpdateWeight = data => post('/pipe/water-pipe/updateWeight', data)

//数据统计看板--管线模块
export const pipeCount =params => get('/statistics/pipe/v1/pipeCount',{ params })

//数据统计看板--经纬度
export const locations =params => get('/statistics/pipe/v1/locations',{ params })


//////////////////////////检查板块

// 检测单新增
export const  sheetAdd = data => post('/pipe/check/v1/add', data)
//数据统计看板--管线模块
export const querySelectList =params => get('/pipe/pipe-info/v1/querySelectList',{ params })
// 地图管线map数据
export const getMapData =params => get('/statistics/pipe/v1/map',{ params })
export const getcheckMapData =params => get('/statistics/pipe/v1/checkMap',{ params })

//给排水管线分段列表
export const checkQueryList =params => get('/pipe/check/v1/queryList',{ params })
// 给排水管线缺陷列表
export const queryPointList =params => get('/pipe/check-item/v1/queryList',{ params })


//给排水管线详情列表
export const getById =params => get('/pipe/water-pipe/v1/getById',{ params })

//分段监测计算
export const  calcCheck = data => post('/pipe/check-item/v1/calc', data)
//分段更新
export const  updateCheckItem = data => post('/pipe/check-item/v1/update', data)

//填写结论
export const  updateCheck = data => post('pipe/check/v1/update', data)

//管线缺陷列表
export const queryCheckPointList =params => get('/pipe/check/v1/queryPointList',{ params })




//////////////////////////检测井
//检查井新增
export const  manholeAdd = data => post('/pipe/manhole-cover/v1/add', data)
export const  manholeUpdate = data => post('/pipe/manhole-cover/v1/update', data)
export const  manholeDelete = data => post('/pipe/manhole-cover/v1/delete', data)
//
// 检查井列表
export const manholeQueryList =params => get('/pipe/manhole-cover/v1/queryList',{ params })
//下拉
export const manholeQuerySelectList =params => get('/pipe/manhole-cover/v1/querySelectList',{ params })
//////////////////////////管线缺陷调查

//导入缺陷
export const  importCheckItem = (data,params) => post('/pipe/check-item/v1/import/'+params, data)
//导入分段参数
export const  importCheck = (data,params) => post('/pipe/check/v1/import/'+params, data)

//计算
export const checkCalc =params => get('/pipe/check/v1/calc',{ params })

// 分段导出
export const exportPipe =params=> getBolb('/pipe/water-pipe/v1/export/'+params)
